import { languages } from './stores.js'
import data from './data/data.js'
import App from './App.svelte';
import URLTools from './utils/URLTools.js'

let queryStrings = URLTools.getQueryString()

let language = queryStrings.lang || 'zh'
console.log(languages)
languages.update(n => n=language)

let langs = [{
	lang: 'zh',
	show: '中文'
},{
	lang: 'en',
	show: 'English'
}]

const app = new App({
	target: document.body,
	props: {
		langs: langs,
		data: data,
	}
});

export default app;